ParcelLabel API
Download Label(s) Direct
Resource URL
UAT:
Download all labels generated within a consignment:
https://api.uat.nzpost.co.nz/ParcelLabel/v3/labels/{consignment_id}/direct?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
Production:
Download all labels generated within a consignment:
https://api.nzpost.co.nz/ParcelLabel/v3/labels/{consignment_id}/direct?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
Resource Description
Returns all labels images as a PDF within a consignment. Unlike resource /labels/{consignment_id}, resource /labels/{consignment_id}/direct only supports PDF format which is set by default. As this resource only supports PDF and not PNG, we do not pass parameters page and base64 as these parameters are only relevant to PNG format. Labels are only available for download of a consignment with status "Complete". Use Get Status of Labels resource to check the status of the consignment prior to download.
Resource Information
Attribute | Detail |
---|---|
Response Format | |
Requires Authentication | Yes |
Rate Limited | 15 calls per second. If rate limit is exceeded, calls will be queued. Calls unprocessed for over 60 seconds will time out. |
Request Parameters
Field Name | Description | Mand | Example |
---|---|---|---|
consignment_id | The unique id of a consignment | Yes | 7EDZHE |
client_id | The client id associated consuming application | Yes | YOUR_CLIENT_ID |
client_secret | The client secret of the consuming application | Yes | YOUR_CLIENT_SECRET |
user_name | The user name | No | user@example.co.nz |
Sample Requests
Download all labels generated within a consignment:
https://api.uat.nzpost.co.nz/ParcelLabel/v3/labels/LLT2BL/direct?clent_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
Download all labels generated within a consignment with user_name parameter:
https://api.uat.nzpost.co.nz/ParcelLabel/v3/labels/LLT2BL/direct?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&user_name=donald
Response
A PDF containing the label image(s) is returned.